<template>

</template>

<script>
  import Qs from 'qs'
  let baseUrl = 'http://www.getword.cn/';
  export default {
    name: "Axios",
    created() {
      console.log(this.HOST+"/user")
      this.$axios.get(this.HOST + "/user", {
        params: {
          id: 20
        }
      }).then((res) => {
        console.log(res.data)
      }).catch((err) => {
        console.log(err);
      });
      this.$axios.post(this.HOST + '/user',Qs.stringify({username:'admin', age:20}))
        .then(res => {
          console.log(res.data)
        }).catch(err => {
        console.log(err)
      })
    }
  }
</script>

<style scoped>

</style>
